home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / p_man / cat3 / f90 / modulo.z / modulo
Text File  |  1998-10-30  |  2KB  |  49 lines

  1. MODULO(3I)                                             Last changed: 1-6-98
  2.  
  3.  
  4. NNAAMMEE
  5.      MMOODDUULLOO - Modulo function
  6.  
  7. SSYYNNOOPPSSIISS
  8.      MMOODDUULLOO (([AA==]_a,, [PP==]_p))
  9.  
  10. IIMMPPLLEEMMEENNTTAATTIIOONN
  11.      UNICOS, UNICOS/mk, and IRIX systems
  12.  
  13. SSTTAANNDDAARRDDSS
  14.      Fortran 90
  15.  
  16. DDEESSCCRRIIPPTTIIOONN
  17.      The MMOODDUULLOO function accepts the following arguments:
  18.  
  19.      _a    Must be of type integer or real
  20.  
  21.      _p    Must be of the same type and kind type parameter as _a
  22.  
  23.      MMOODDUULLOO is an elemental function.  The name of this intrinsic cannot be
  24.      passed as an argument.
  25.  
  26. RREETTUURRNN VVAALLUUEESS
  27.      The result type and type parameter are the same as _a, which can be
  28.      integer or real.
  29.  
  30.      When _a is of type integer, if PP =//= 00, MMOODDUULLOO (_a, _p) has the value _r
  31.      such that AA == QQ xx PP ++ RR, where _q is an integer.  The inequality
  32.      0 <= _r < _p holds if _p > 0, and _p < _r <= 0 holds if _p < 0.
  33.  
  34.      If PP == 00, the result is machine-specific.  The result is not a
  35.      meaningful number (a NAN) when that value is available.  Otherwise the
  36.      result is 0.
  37.  
  38.      When _a is of type real, if PP =//= 00, the value of the result is AA -- FFLLOOOORR
  39.      ((AA // PP)) ** PP.  If PP == 00, the result is machine-specific.
  40.  
  41. EEXXAAMMPPLLEESS
  42.      MMOODDUULLOO((88,, 55)) has the value 3.  MMOODDUULLOO((--88,, 55)) has the value 2.
  43.      MMOODDUULLOO((88,, --55)) has the value -2.  MMOODDUULLOO((--88,, --55)) has the value -3.
  44.  
  45. SSEEEE AALLSSOO
  46.      _I_n_t_r_i_n_s_i_c _P_r_o_c_e_d_u_r_e_s _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l, publication SR-2138, for the
  47.      printed version of this man page.
  48.  
  49.